<?php

//define('DB_USER', 'root');
//define('DB_PASSWORD', '00000000');
//define('DB_HOST', 'localhost');
//define('DB_NAME', 'amcnnc5_dev_amcnn');
//define('DB_CODE', 'utf8');


class DBConnection{
	function getConnection(){
	  //change to your database server/user name/password
	  mysql_connect("localhost","root","00000000") or
            //mysql_connect("localhost","amcnnc5","3prismcreation") or
         die("Could not connect: " . mysql_error());
           // $dbc = mysql_connect(DB_HOST,DB_USER,DB_PASSWORD,DB_NAME) or 
                   // die ("Could not connect to MySQL: " . mysql_error());
            
          mysql_query("set character set 'utf8'");//读库
          mysql_query("set names 'utf8'");//写库
            //change to your database name
		mysql_select_db("amcnnc5_dev_amcnn") or 
		     die("Could not select database: " . mysql_error());
	}
        
       // function closeConnection() {
            
           // mysql_close("localhost","root","00000000");
            
        //}
}
?>